pip install Anaconda
conda create -y -n chatglm python=3.10
conda activate chatglm
export MODEL_PATH=/home/ChatGLM3/THUDM/chatglm3-6b
export TOKENIZER_PATH=/home/ChatGLM3/THUDM/chatglm3-6b
cd /home
git clone https://gitee.com/wujiaxin/ChatGLM3.git
cd ChatGLM3
pip install -r requirements.txt
pip install mdtex2html
mkdir THUDM
cd THUDM
git lfs install
git clone https://www.modelscope.cn/ZhipuAI/chatglm3-6b.git
cd ../
cd finetune_demo
pip install transformers==4.30.2 accelerate sentencepiece astunparse deepspeed
./scripts/format_advertise_gen.py --path "AdvertiseGen/train.json"
./scripts/finetune_pt.sh
python inference.py \
    --pt-checkpoint "/home/ChatGLM3/finetune_demo/output/checkpoint/" \
    --model /home/ChatGLM3/THUDM/chatglm3-6b

cd ../composite_demo
pip install -r requirements.txt
MODEL_PATH="/home/ChatGLM3/THUDM/chatglm3-6b" PT_PATH="/home/ChatGLM3/finetune_demo/output/checkpoint/" streamlit run main.py
cd ../
streamlit run basic_demo/web_demo2.py